<%@ page import="java.util.*;" %>
<%@page contentType="text/plain" pageEncoding="UTF-8"%>
<%
    // print login json
    // includes user name and password. Has key and text.
    // [{"id": "1", "description": "this is a clue"}, {"id": "2", "description": "another clue"}]

            List<Map<String, String>> player = (List<Map<String, String>>) request.getAttribute("loginInfo");
            out.print("[");
            for (int i = 0; i < player.size(); i++) {
                String userName = player.get(i).get("userName");
                String passWord = player.get(i).get("passWord");
                String jsonDict = String.format("{\"userName\": \"%s\", \"passWord\": \"%s\"}", userName, passWord);
                out.print(jsonDict);
                if (i + 1 < player.size()) {
                    out.print(", ");
                }
            }
            out.print("]");

           
%>
